// p5.disableFriendlyErrors = true; // disables FES

function drawFps() {
  let fps = frameRate()
  colorMode('RGB')
  fill('#2980b9')
  rect(0,0,80,40)

  fill('#e74c3c')
  textSize(20);
  strokeWeight(10)
  text('FPS: ' + fps.toFixed(2), 10, 20)
}

function setup() {
  let canvas = createCanvas(innerWidth,innerHeight)
  noStroke()
  // console.log(width,height);
  // console.log(innerWidth,innerHeight);
  // console.log(displayWidth,displayHeight);
  canvas.parent('canvasCon')
  frameRate(60)
  colorMode('HSB', 100)
}


function draw() {
  clear()
  drawFps()
}